\(\int \frac {(d+e x)^2 (a+b x+c x^2)}{\sqrt {f+g x}} \, dx\) [820]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 212 \[ \int \frac {(d+e x)^2 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx=\frac {2 (e f-d g)^2 \left (c f^2-b f g+a g^2\right ) \sqrt {f+g x}}{g^5}-\frac {2 (e f-d g) (2 c f (2 e f-d g)-g (3 b e f-b d g-2 a e g)) (f+g x)^{3/2}}{3 g^5}-\frac {2 \left (e g (3 b e f-2 b d g-a e g)-c \left (6 e^2 f^2-6 d e f g+d^2 g^2\right )\right ) (f+g x)^{5/2}}{5 g^5}-\frac {2 e (4 c e f-2 c d g-b e g) (f+g x)^{7/2}}{7 g^5}+\frac {2 c e^2 (f+g x)^{9/2}}{9 g^5} \]

[Out]

-2/3*(-d*g+e*f)*(2*c*f*(-d*g+2*e*f)-g*(-2*a*e*g-b*d*g+3*b*e*f))*(g*x+f)^(3/2)/g^5-2/5*(e*g*(-a*e*g-2*b*d*g+3*b
*e*f)-c*(d^2*g^2-6*d*e*f*g+6*e^2*f^2))*(g*x+f)^(5/2)/g^5-2/7*e*(-b*e*g-2*c*d*g+4*c*e*f)*(g*x+f)^(7/2)/g^5+2/9*
c*e^2*(g*x+f)^(9/2)/g^5+2*(-d*g+e*f)^2*(a*g^2-b*f*g+c*f^2)*(g*x+f)^(1/2)/g^5

Rubi [A] (verified)

Time = 0.20 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {911, 1167} \[ \int \frac {(d+e x)^2 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx=-\frac {2 (f+g x)^{5/2} \left (e g (-a e g-2 b d g+3 b e f)-c \left (d^2 g^2-6 d e f g+6 e^2 f^2\right )\right )}{5 g^5}+\frac {2 \sqrt {f+g x} (e f-d g)^2 \left (a g^2-b f g+c f^2\right )}{g^5}-\frac {2 (f+g x)^{3/2} (e f-d g) (2 c f (2 e f-d g)-g (-2 a e g-b d g+3 b e f))}{3 g^5}-\frac {2 e (f+g x)^{7/2} (-b e g-2 c d g+4 c e f)}{7 g^5}+\frac {2 c e^2 (f+g x)^{9/2}}{9 g^5} \]

[In]

Int[((d + e*x)^2*(a + b*x + c*x^2))/Sqrt[f + g*x],x]

[Out]

(2*(e*f - d*g)^2*(c*f^2 - b*f*g + a*g^2)*Sqrt[f + g*x])/g^5 - (2*(e*f - d*g)*(2*c*f*(2*e*f - d*g) - g*(3*b*e*f
 - b*d*g - 2*a*e*g))*(f + g*x)^(3/2))/(3*g^5) - (2*(e*g*(3*b*e*f - 2*b*d*g - a*e*g) - c*(6*e^2*f^2 - 6*d*e*f*g
 + d^2*g^2))*(f + g*x)^(5/2))/(5*g^5) - (2*e*(4*c*e*f - 2*c*d*g - b*e*g)*(f + g*x)^(7/2))/(7*g^5) + (2*c*e^2*(
f + g*x)^(9/2))/(9*g^5)

Rule 911

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> With[{q = Denominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + g*(x^q/e))^n*((c*d^2 - b*d
*e + a*e^2)/e^2 - (2*c*d - b*e)*(x^q/e^2) + c*(x^(2*q)/e^2))^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, b, c
, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegersQ[n,
 p] && FractionQ[m]

Rule 1167

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rubi steps \begin{align*} \text {integral}& = \frac {2 \text {Subst}\left (\int \left (\frac {-e f+d g}{g}+\frac {e x^2}{g}\right )^2 \left (\frac {c f^2-b f g+a g^2}{g^2}-\frac {(2 c f-b g) x^2}{g^2}+\frac {c x^4}{g^2}\right ) \, dx,x,\sqrt {f+g x}\right )}{g} \\ & = \frac {2 \text {Subst}\left (\int \left (\frac {(-e f+d g)^2 \left (c f^2-b f g+a g^2\right )}{g^4}+\frac {(e f-d g) (-2 c f (2 e f-d g)+g (3 b e f-b d g-2 a e g)) x^2}{g^4}+\frac {\left (-e g (3 b e f-2 b d g-a e g)+c \left (6 e^2 f^2-6 d e f g+d^2 g^2\right )\right ) x^4}{g^4}+\frac {e (-4 c e f+2 c d g+b e g) x^6}{g^4}+\frac {c e^2 x^8}{g^4}\right ) \, dx,x,\sqrt {f+g x}\right )}{g} \\ & = \frac {2 (e f-d g)^2 \left (c f^2-b f g+a g^2\right ) \sqrt {f+g x}}{g^5}-\frac {2 (e f-d g) (2 c f (2 e f-d g)-g (3 b e f-b d g-2 a e g)) (f+g x)^{3/2}}{3 g^5}-\frac {2 \left (e g (3 b e f-2 b d g-a e g)-c \left (6 e^2 f^2-6 d e f g+d^2 g^2\right )\right ) (f+g x)^{5/2}}{5 g^5}-\frac {2 e (4 c e f-2 c d g-b e g) (f+g x)^{7/2}}{7 g^5}+\frac {2 c e^2 (f+g x)^{9/2}}{9 g^5} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.21 \[ \int \frac {(d+e x)^2 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx=\frac {2 \sqrt {f+g x} \left (c \left (21 d^2 g^2 \left (8 f^2-4 f g x+3 g^2 x^2\right )+18 d e g \left (-16 f^3+8 f^2 g x-6 f g^2 x^2+5 g^3 x^3\right )+e^2 \left (128 f^4-64 f^3 g x+48 f^2 g^2 x^2-40 f g^3 x^3+35 g^4 x^4\right )\right )+3 g \left (7 a g \left (15 d^2 g^2+10 d e g (-2 f+g x)+e^2 \left (8 f^2-4 f g x+3 g^2 x^2\right )\right )+b \left (35 d^2 g^2 (-2 f+g x)+14 d e g \left (8 f^2-4 f g x+3 g^2 x^2\right )-3 e^2 \left (16 f^3-8 f^2 g x+6 f g^2 x^2-5 g^3 x^3\right )\right )\right )\right )}{315 g^5} \]

[In]

Integrate[((d + e*x)^2*(a + b*x + c*x^2))/Sqrt[f + g*x],x]

[Out]

(2*Sqrt[f + g*x]*(c*(21*d^2*g^2*(8*f^2 - 4*f*g*x + 3*g^2*x^2) + 18*d*e*g*(-16*f^3 + 8*f^2*g*x - 6*f*g^2*x^2 +
5*g^3*x^3) + e^2*(128*f^4 - 64*f^3*g*x + 48*f^2*g^2*x^2 - 40*f*g^3*x^3 + 35*g^4*x^4)) + 3*g*(7*a*g*(15*d^2*g^2
 + 10*d*e*g*(-2*f + g*x) + e^2*(8*f^2 - 4*f*g*x + 3*g^2*x^2)) + b*(35*d^2*g^2*(-2*f + g*x) + 14*d*e*g*(8*f^2 -
 4*f*g*x + 3*g^2*x^2) - 3*e^2*(16*f^3 - 8*f^2*g*x + 6*f*g^2*x^2 - 5*g^3*x^3)))))/(315*g^5)

Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 192, normalized size of antiderivative = 0.91

method result size
pseudoelliptic \(\frac {2 \sqrt {g x +f}\, \left (\left (\frac {\left (\frac {5}{9} c \,x^{2}+\frac {5}{7} b x +a \right ) x^{2} e^{2}}{5}+\frac {2 d \left (\frac {3}{7} c \,x^{2}+\frac {3}{5} b x +a \right ) x e}{3}+d^{2} \left (\frac {1}{5} c \,x^{2}+\frac {1}{3} b x +a \right )\right ) g^{4}-\frac {4 \left (\frac {\left (\frac {10}{21} c \,x^{2}+\frac {9}{14} b x +a \right ) x \,e^{2}}{5}+d \left (\frac {9}{35} c \,x^{2}+\frac {2}{5} b x +a \right ) e +\frac {d^{2} \left (\frac {2 c x}{5}+b \right )}{2}\right ) f \,g^{3}}{3}+\frac {8 \left (\left (\frac {2}{7} c \,x^{2}+\frac {3}{7} b x +a \right ) e^{2}+2 d \left (\frac {3 c x}{7}+b \right ) e +c \,d^{2}\right ) f^{2} g^{2}}{15}-\frac {16 e \left (\left (\frac {4 c x}{9}+b \right ) e +2 c d \right ) f^{3} g}{35}+\frac {128 c \,e^{2} f^{4}}{315}\right )}{g^{5}}\) \(192\)
derivativedivides \(\frac {\frac {2 c \,e^{2} \left (g x +f \right )^{\frac {9}{2}}}{9}+\frac {2 \left (2 \left (d g -e f \right ) e c +e^{2} \left (b g -2 c f \right )\right ) \left (g x +f \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (d g -e f \right )^{2} c +2 \left (d g -e f \right ) e \left (b g -2 c f \right )+e^{2} \left (a \,g^{2}-b f g +c \,f^{2}\right )\right ) \left (g x +f \right )^{\frac {5}{2}}}{5}+\frac {2 \left (\left (d g -e f \right )^{2} \left (b g -2 c f \right )+2 \left (d g -e f \right ) e \left (a \,g^{2}-b f g +c \,f^{2}\right )\right ) \left (g x +f \right )^{\frac {3}{2}}}{3}+2 \left (d g -e f \right )^{2} \left (a \,g^{2}-b f g +c \,f^{2}\right ) \sqrt {g x +f}}{g^{5}}\) \(205\)
default \(\frac {\frac {2 c \,e^{2} \left (g x +f \right )^{\frac {9}{2}}}{9}+\frac {2 \left (2 \left (d g -e f \right ) e c +e^{2} \left (b g -2 c f \right )\right ) \left (g x +f \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (d g -e f \right )^{2} c +2 \left (d g -e f \right ) e \left (b g -2 c f \right )+e^{2} \left (a \,g^{2}-b f g +c \,f^{2}\right )\right ) \left (g x +f \right )^{\frac {5}{2}}}{5}+\frac {2 \left (\left (d g -e f \right )^{2} \left (b g -2 c f \right )+2 \left (d g -e f \right ) e \left (a \,g^{2}-b f g +c \,f^{2}\right )\right ) \left (g x +f \right )^{\frac {3}{2}}}{3}+2 \left (d g -e f \right )^{2} \left (a \,g^{2}-b f g +c \,f^{2}\right ) \sqrt {g x +f}}{g^{5}}\) \(205\)
gosper \(\frac {2 \sqrt {g x +f}\, \left (35 c \,e^{2} x^{4} g^{4}+45 b \,e^{2} g^{4} x^{3}+90 c d e \,g^{4} x^{3}-40 c \,e^{2} f \,g^{3} x^{3}+63 a \,e^{2} g^{4} x^{2}+126 b d e \,g^{4} x^{2}-54 b \,e^{2} f \,g^{3} x^{2}+63 c \,d^{2} g^{4} x^{2}-108 c d e f \,g^{3} x^{2}+48 c \,e^{2} f^{2} g^{2} x^{2}+210 a d e \,g^{4} x -84 a \,e^{2} f \,g^{3} x +105 b \,d^{2} g^{4} x -168 b d e f \,g^{3} x +72 b \,e^{2} f^{2} g^{2} x -84 c \,d^{2} f \,g^{3} x +144 c d e \,f^{2} g^{2} x -64 c \,e^{2} f^{3} g x +315 a \,d^{2} g^{4}-420 a d e f \,g^{3}+168 a \,e^{2} f^{2} g^{2}-210 b \,d^{2} f \,g^{3}+336 b d e \,f^{2} g^{2}-144 b \,e^{2} f^{3} g +168 c \,d^{2} f^{2} g^{2}-288 c d e \,f^{3} g +128 c \,e^{2} f^{4}\right )}{315 g^{5}}\) \(315\)
trager \(\frac {2 \sqrt {g x +f}\, \left (35 c \,e^{2} x^{4} g^{4}+45 b \,e^{2} g^{4} x^{3}+90 c d e \,g^{4} x^{3}-40 c \,e^{2} f \,g^{3} x^{3}+63 a \,e^{2} g^{4} x^{2}+126 b d e \,g^{4} x^{2}-54 b \,e^{2} f \,g^{3} x^{2}+63 c \,d^{2} g^{4} x^{2}-108 c d e f \,g^{3} x^{2}+48 c \,e^{2} f^{2} g^{2} x^{2}+210 a d e \,g^{4} x -84 a \,e^{2} f \,g^{3} x +105 b \,d^{2} g^{4} x -168 b d e f \,g^{3} x +72 b \,e^{2} f^{2} g^{2} x -84 c \,d^{2} f \,g^{3} x +144 c d e \,f^{2} g^{2} x -64 c \,e^{2} f^{3} g x +315 a \,d^{2} g^{4}-420 a d e f \,g^{3}+168 a \,e^{2} f^{2} g^{2}-210 b \,d^{2} f \,g^{3}+336 b d e \,f^{2} g^{2}-144 b \,e^{2} f^{3} g +168 c \,d^{2} f^{2} g^{2}-288 c d e \,f^{3} g +128 c \,e^{2} f^{4}\right )}{315 g^{5}}\) \(315\)
risch \(\frac {2 \sqrt {g x +f}\, \left (35 c \,e^{2} x^{4} g^{4}+45 b \,e^{2} g^{4} x^{3}+90 c d e \,g^{4} x^{3}-40 c \,e^{2} f \,g^{3} x^{3}+63 a \,e^{2} g^{4} x^{2}+126 b d e \,g^{4} x^{2}-54 b \,e^{2} f \,g^{3} x^{2}+63 c \,d^{2} g^{4} x^{2}-108 c d e f \,g^{3} x^{2}+48 c \,e^{2} f^{2} g^{2} x^{2}+210 a d e \,g^{4} x -84 a \,e^{2} f \,g^{3} x +105 b \,d^{2} g^{4} x -168 b d e f \,g^{3} x +72 b \,e^{2} f^{2} g^{2} x -84 c \,d^{2} f \,g^{3} x +144 c d e \,f^{2} g^{2} x -64 c \,e^{2} f^{3} g x +315 a \,d^{2} g^{4}-420 a d e f \,g^{3}+168 a \,e^{2} f^{2} g^{2}-210 b \,d^{2} f \,g^{3}+336 b d e \,f^{2} g^{2}-144 b \,e^{2} f^{3} g +168 c \,d^{2} f^{2} g^{2}-288 c d e \,f^{3} g +128 c \,e^{2} f^{4}\right )}{315 g^{5}}\) \(315\)

[In]

int((e*x+d)^2*(c*x^2+b*x+a)/(g*x+f)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*(g*x+f)^(1/2)*((1/5*(5/9*c*x^2+5/7*b*x+a)*x^2*e^2+2/3*d*(3/7*c*x^2+3/5*b*x+a)*x*e+d^2*(1/5*c*x^2+1/3*b*x+a))
*g^4-4/3*(1/5*(10/21*c*x^2+9/14*b*x+a)*x*e^2+d*(9/35*c*x^2+2/5*b*x+a)*e+1/2*d^2*(2/5*c*x+b))*f*g^3+8/15*((2/7*
c*x^2+3/7*b*x+a)*e^2+2*d*(3/7*c*x+b)*e+c*d^2)*f^2*g^2-16/35*e*((4/9*c*x+b)*e+2*c*d)*f^3*g+128/315*c*e^2*f^4)/g
^5

Fricas [A] (verification not implemented)

none

Time = 0.47 (sec) , antiderivative size = 260, normalized size of antiderivative = 1.23 \[ \int \frac {(d+e x)^2 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx=\frac {2 \, {\left (35 \, c e^{2} g^{4} x^{4} + 128 \, c e^{2} f^{4} + 315 \, a d^{2} g^{4} - 144 \, {\left (2 \, c d e + b e^{2}\right )} f^{3} g + 168 \, {\left (c d^{2} + 2 \, b d e + a e^{2}\right )} f^{2} g^{2} - 210 \, {\left (b d^{2} + 2 \, a d e\right )} f g^{3} - 5 \, {\left (8 \, c e^{2} f g^{3} - 9 \, {\left (2 \, c d e + b e^{2}\right )} g^{4}\right )} x^{3} + 3 \, {\left (16 \, c e^{2} f^{2} g^{2} - 18 \, {\left (2 \, c d e + b e^{2}\right )} f g^{3} + 21 \, {\left (c d^{2} + 2 \, b d e + a e^{2}\right )} g^{4}\right )} x^{2} - {\left (64 \, c e^{2} f^{3} g - 72 \, {\left (2 \, c d e + b e^{2}\right )} f^{2} g^{2} + 84 \, {\left (c d^{2} + 2 \, b d e + a e^{2}\right )} f g^{3} - 105 \, {\left (b d^{2} + 2 \, a d e\right )} g^{4}\right )} x\right )} \sqrt {g x + f}}{315 \, g^{5}} \]

[In]

integrate((e*x+d)^2*(c*x^2+b*x+a)/(g*x+f)^(1/2),x, algorithm="fricas")

[Out]

2/315*(35*c*e^2*g^4*x^4 + 128*c*e^2*f^4 + 315*a*d^2*g^4 - 144*(2*c*d*e + b*e^2)*f^3*g + 168*(c*d^2 + 2*b*d*e +
 a*e^2)*f^2*g^2 - 210*(b*d^2 + 2*a*d*e)*f*g^3 - 5*(8*c*e^2*f*g^3 - 9*(2*c*d*e + b*e^2)*g^4)*x^3 + 3*(16*c*e^2*
f^2*g^2 - 18*(2*c*d*e + b*e^2)*f*g^3 + 21*(c*d^2 + 2*b*d*e + a*e^2)*g^4)*x^2 - (64*c*e^2*f^3*g - 72*(2*c*d*e +
 b*e^2)*f^2*g^2 + 84*(c*d^2 + 2*b*d*e + a*e^2)*f*g^3 - 105*(b*d^2 + 2*a*d*e)*g^4)*x)*sqrt(g*x + f)/g^5

Sympy [A] (verification not implemented)

Time = 1.05 (sec) , antiderivative size = 427, normalized size of antiderivative = 2.01 \[ \int \frac {(d+e x)^2 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx=\begin {cases} \frac {2 \left (\frac {c e^{2} \left (f + g x\right )^{\frac {9}{2}}}{9 g^{4}} + \frac {\left (f + g x\right )^{\frac {7}{2}} \left (b e^{2} g + 2 c d e g - 4 c e^{2} f\right )}{7 g^{4}} + \frac {\left (f + g x\right )^{\frac {5}{2}} \left (a e^{2} g^{2} + 2 b d e g^{2} - 3 b e^{2} f g + c d^{2} g^{2} - 6 c d e f g + 6 c e^{2} f^{2}\right )}{5 g^{4}} + \frac {\left (f + g x\right )^{\frac {3}{2}} \cdot \left (2 a d e g^{3} - 2 a e^{2} f g^{2} + b d^{2} g^{3} - 4 b d e f g^{2} + 3 b e^{2} f^{2} g - 2 c d^{2} f g^{2} + 6 c d e f^{2} g - 4 c e^{2} f^{3}\right )}{3 g^{4}} + \frac {\sqrt {f + g x} \left (a d^{2} g^{4} - 2 a d e f g^{3} + a e^{2} f^{2} g^{2} - b d^{2} f g^{3} + 2 b d e f^{2} g^{2} - b e^{2} f^{3} g + c d^{2} f^{2} g^{2} - 2 c d e f^{3} g + c e^{2} f^{4}\right )}{g^{4}}\right )}{g} & \text {for}\: g \neq 0 \\\frac {a d^{2} x + \frac {c e^{2} x^{5}}{5} + \frac {x^{4} \left (b e^{2} + 2 c d e\right )}{4} + \frac {x^{3} \left (a e^{2} + 2 b d e + c d^{2}\right )}{3} + \frac {x^{2} \cdot \left (2 a d e + b d^{2}\right )}{2}}{\sqrt {f}} & \text {otherwise} \end {cases} \]

[In]

integrate((e*x+d)**2*(c*x**2+b*x+a)/(g*x+f)**(1/2),x)

[Out]

Piecewise((2*(c*e**2*(f + g*x)**(9/2)/(9*g**4) + (f + g*x)**(7/2)*(b*e**2*g + 2*c*d*e*g - 4*c*e**2*f)/(7*g**4)
 + (f + g*x)**(5/2)*(a*e**2*g**2 + 2*b*d*e*g**2 - 3*b*e**2*f*g + c*d**2*g**2 - 6*c*d*e*f*g + 6*c*e**2*f**2)/(5
*g**4) + (f + g*x)**(3/2)*(2*a*d*e*g**3 - 2*a*e**2*f*g**2 + b*d**2*g**3 - 4*b*d*e*f*g**2 + 3*b*e**2*f**2*g - 2
*c*d**2*f*g**2 + 6*c*d*e*f**2*g - 4*c*e**2*f**3)/(3*g**4) + sqrt(f + g*x)*(a*d**2*g**4 - 2*a*d*e*f*g**3 + a*e*
*2*f**2*g**2 - b*d**2*f*g**3 + 2*b*d*e*f**2*g**2 - b*e**2*f**3*g + c*d**2*f**2*g**2 - 2*c*d*e*f**3*g + c*e**2*
f**4)/g**4)/g, Ne(g, 0)), ((a*d**2*x + c*e**2*x**5/5 + x**4*(b*e**2 + 2*c*d*e)/4 + x**3*(a*e**2 + 2*b*d*e + c*
d**2)/3 + x**2*(2*a*d*e + b*d**2)/2)/sqrt(f), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.23 \[ \int \frac {(d+e x)^2 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx=\frac {2 \, {\left (35 \, {\left (g x + f\right )}^{\frac {9}{2}} c e^{2} - 45 \, {\left (4 \, c e^{2} f - {\left (2 \, c d e + b e^{2}\right )} g\right )} {\left (g x + f\right )}^{\frac {7}{2}} + 63 \, {\left (6 \, c e^{2} f^{2} - 3 \, {\left (2 \, c d e + b e^{2}\right )} f g + {\left (c d^{2} + 2 \, b d e + a e^{2}\right )} g^{2}\right )} {\left (g x + f\right )}^{\frac {5}{2}} - 105 \, {\left (4 \, c e^{2} f^{3} - 3 \, {\left (2 \, c d e + b e^{2}\right )} f^{2} g + 2 \, {\left (c d^{2} + 2 \, b d e + a e^{2}\right )} f g^{2} - {\left (b d^{2} + 2 \, a d e\right )} g^{3}\right )} {\left (g x + f\right )}^{\frac {3}{2}} + 315 \, {\left (c e^{2} f^{4} + a d^{2} g^{4} - {\left (2 \, c d e + b e^{2}\right )} f^{3} g + {\left (c d^{2} + 2 \, b d e + a e^{2}\right )} f^{2} g^{2} - {\left (b d^{2} + 2 \, a d e\right )} f g^{3}\right )} \sqrt {g x + f}\right )}}{315 \, g^{5}} \]

[In]

integrate((e*x+d)^2*(c*x^2+b*x+a)/(g*x+f)^(1/2),x, algorithm="maxima")

[Out]

2/315*(35*(g*x + f)^(9/2)*c*e^2 - 45*(4*c*e^2*f - (2*c*d*e + b*e^2)*g)*(g*x + f)^(7/2) + 63*(6*c*e^2*f^2 - 3*(
2*c*d*e + b*e^2)*f*g + (c*d^2 + 2*b*d*e + a*e^2)*g^2)*(g*x + f)^(5/2) - 105*(4*c*e^2*f^3 - 3*(2*c*d*e + b*e^2)
*f^2*g + 2*(c*d^2 + 2*b*d*e + a*e^2)*f*g^2 - (b*d^2 + 2*a*d*e)*g^3)*(g*x + f)^(3/2) + 315*(c*e^2*f^4 + a*d^2*g
^4 - (2*c*d*e + b*e^2)*f^3*g + (c*d^2 + 2*b*d*e + a*e^2)*f^2*g^2 - (b*d^2 + 2*a*d*e)*f*g^3)*sqrt(g*x + f))/g^5

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 363, normalized size of antiderivative = 1.71 \[ \int \frac {(d+e x)^2 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx=\frac {2 \, {\left (315 \, \sqrt {g x + f} a d^{2} + \frac {105 \, {\left ({\left (g x + f\right )}^{\frac {3}{2}} - 3 \, \sqrt {g x + f} f\right )} b d^{2}}{g} + \frac {210 \, {\left ({\left (g x + f\right )}^{\frac {3}{2}} - 3 \, \sqrt {g x + f} f\right )} a d e}{g} + \frac {21 \, {\left (3 \, {\left (g x + f\right )}^{\frac {5}{2}} - 10 \, {\left (g x + f\right )}^{\frac {3}{2}} f + 15 \, \sqrt {g x + f} f^{2}\right )} c d^{2}}{g^{2}} + \frac {42 \, {\left (3 \, {\left (g x + f\right )}^{\frac {5}{2}} - 10 \, {\left (g x + f\right )}^{\frac {3}{2}} f + 15 \, \sqrt {g x + f} f^{2}\right )} b d e}{g^{2}} + \frac {21 \, {\left (3 \, {\left (g x + f\right )}^{\frac {5}{2}} - 10 \, {\left (g x + f\right )}^{\frac {3}{2}} f + 15 \, \sqrt {g x + f} f^{2}\right )} a e^{2}}{g^{2}} + \frac {18 \, {\left (5 \, {\left (g x + f\right )}^{\frac {7}{2}} - 21 \, {\left (g x + f\right )}^{\frac {5}{2}} f + 35 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{2} - 35 \, \sqrt {g x + f} f^{3}\right )} c d e}{g^{3}} + \frac {9 \, {\left (5 \, {\left (g x + f\right )}^{\frac {7}{2}} - 21 \, {\left (g x + f\right )}^{\frac {5}{2}} f + 35 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{2} - 35 \, \sqrt {g x + f} f^{3}\right )} b e^{2}}{g^{3}} + \frac {{\left (35 \, {\left (g x + f\right )}^{\frac {9}{2}} - 180 \, {\left (g x + f\right )}^{\frac {7}{2}} f + 378 \, {\left (g x + f\right )}^{\frac {5}{2}} f^{2} - 420 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{3} + 315 \, \sqrt {g x + f} f^{4}\right )} c e^{2}}{g^{4}}\right )}}{315 \, g} \]

[In]

integrate((e*x+d)^2*(c*x^2+b*x+a)/(g*x+f)^(1/2),x, algorithm="giac")

[Out]

2/315*(315*sqrt(g*x + f)*a*d^2 + 105*((g*x + f)^(3/2) - 3*sqrt(g*x + f)*f)*b*d^2/g + 210*((g*x + f)^(3/2) - 3*
sqrt(g*x + f)*f)*a*d*e/g + 21*(3*(g*x + f)^(5/2) - 10*(g*x + f)^(3/2)*f + 15*sqrt(g*x + f)*f^2)*c*d^2/g^2 + 42
*(3*(g*x + f)^(5/2) - 10*(g*x + f)^(3/2)*f + 15*sqrt(g*x + f)*f^2)*b*d*e/g^2 + 21*(3*(g*x + f)^(5/2) - 10*(g*x
 + f)^(3/2)*f + 15*sqrt(g*x + f)*f^2)*a*e^2/g^2 + 18*(5*(g*x + f)^(7/2) - 21*(g*x + f)^(5/2)*f + 35*(g*x + f)^
(3/2)*f^2 - 35*sqrt(g*x + f)*f^3)*c*d*e/g^3 + 9*(5*(g*x + f)^(7/2) - 21*(g*x + f)^(5/2)*f + 35*(g*x + f)^(3/2)
*f^2 - 35*sqrt(g*x + f)*f^3)*b*e^2/g^3 + (35*(g*x + f)^(9/2) - 180*(g*x + f)^(7/2)*f + 378*(g*x + f)^(5/2)*f^2
 - 420*(g*x + f)^(3/2)*f^3 + 315*sqrt(g*x + f)*f^4)*c*e^2/g^4)/g

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 204, normalized size of antiderivative = 0.96 \[ \int \frac {(d+e x)^2 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx=\frac {{\left (f+g\,x\right )}^{7/2}\,\left (2\,b\,e^2\,g-8\,c\,e^2\,f+4\,c\,d\,e\,g\right )}{7\,g^5}+\frac {{\left (f+g\,x\right )}^{5/2}\,\left (2\,c\,d^2\,g^2-12\,c\,d\,e\,f\,g+4\,b\,d\,e\,g^2+12\,c\,e^2\,f^2-6\,b\,e^2\,f\,g+2\,a\,e^2\,g^2\right )}{5\,g^5}+\frac {2\,{\left (f+g\,x\right )}^{3/2}\,\left (d\,g-e\,f\right )\,\left (2\,a\,e\,g^2+b\,d\,g^2+4\,c\,e\,f^2-3\,b\,e\,f\,g-2\,c\,d\,f\,g\right )}{3\,g^5}+\frac {2\,\sqrt {f+g\,x}\,{\left (d\,g-e\,f\right )}^2\,\left (c\,f^2-b\,f\,g+a\,g^2\right )}{g^5}+\frac {2\,c\,e^2\,{\left (f+g\,x\right )}^{9/2}}{9\,g^5} \]

[In]

int(((d + e*x)^2*(a + b*x + c*x^2))/(f + g*x)^(1/2),x)

[Out]

((f + g*x)^(7/2)*(2*b*e^2*g - 8*c*e^2*f + 4*c*d*e*g))/(7*g^5) + ((f + g*x)^(5/2)*(2*a*e^2*g^2 + 2*c*d^2*g^2 +
12*c*e^2*f^2 + 4*b*d*e*g^2 - 6*b*e^2*f*g - 12*c*d*e*f*g))/(5*g^5) + (2*(f + g*x)^(3/2)*(d*g - e*f)*(2*a*e*g^2
+ b*d*g^2 + 4*c*e*f^2 - 3*b*e*f*g - 2*c*d*f*g))/(3*g^5) + (2*(f + g*x)^(1/2)*(d*g - e*f)^2*(a*g^2 + c*f^2 - b*
f*g))/g^5 + (2*c*e^2*(f + g*x)^(9/2))/(9*g^5)